﻿using System;
using System.Collections.Generic;
using System.Linq;

using ProjectBase.Core;

using $prjsn$.Entity;
using $prjsn$.Common.Data;

namespace $safeprojectname$.Shared.CodeLists
{
    public class CodeListMappingInfo : IHaveMappingInfo<CodeList>
    {
        private IList<MappingDescription> _mappingInfo;

        public IList<MappingDescription> MappingInfo
        {
            get
            {
                var mappingInfo = _mappingInfo;
                if (mappingInfo.IsNull())
                {
                    mappingInfo = new Services.Xml.ArticleCategoryDao().MappingInfo;
                    _mappingInfo = mappingInfo;
                }
                return mappingInfo;
            }
        }
    }
}